<template>
  <div id="zffw">
    <div id="zffwbt">
      <h3>优惠</h3>
      <span>更多</span>
    </div>
    <div>
      <ul class="">
        <!-- 点击活动、优惠li--跳转至二级页面--优惠活动 -->
        <li v-for="(v, i) in youhui" :key="i" @click="fun()">
          <div class="left">
            <h4>{{ v.title }}</h4>
            <span>{{ v.cont }}</span>
          </div>
          <img :src="v.imgUrl" alt="" />
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  props: ["youhui"],
  methods: {
    fun() {
      // 编程式方式进行----路由跳转
      this.$router.push("/YouHUI");
    },
  },
};
</script>

<style lang="less" scoped>
#zffw {
  border-top: 0.01rem solid #dddfe1;
  width: 90%;
  margin: auto;
  font-size: 0.12rem;
  margin-bottom: 0.2rem;
}
#zffwbt {
  display: flex;
  line-height: 0.3rem;
  justify-content: space-between;
  margin-top: 0.1rem;
}
ul {
  width: 100%;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
li {
  display: flex;
  justify-content: space-between;
  width: 41%;
  float: left;
  height: 0.6rem;
  margin-top: 0.1rem;
  padding: 0 0.1333rem;
  background-color: #fafafa;
  overflow: hidden;
}
h3 {
  line-height: 0.3rem;
  font-size: 0.16rem;
}
h4 {
  line-height: 0.3rem;
  font-size: 0.14rem;
}
img {
  width: 0.4rem;
  height: 0.4rem;
  margin-top: 0.1rem;
}
li span {
  color: #747675;
}
</style>